Tag Link | [File->Open] | Category | File |
---|---|---|---|
Type | Member | Source Available | Yes |
Support | Preferred | Version | 7.0 |
Change | Unchanged | Data Source | Any |
Output Type | None | Security | File |
Implementation | LCAPI | Sets | Lasso 8.5, Lasso 8.0, Lasso 7.0 |
Opens a new connection to a file. Requires the name and path to a file as a parameter. Optional parameters may include an open mode and read mode, as in the [File] tag. The open mode and read mode set in the initial [File] tag call are used by default.
[File Variable->(Open: '/folder/file.txt')]
Required Parameters | |
---|---|
'File path' | The name and path to a file. |
Optional Parameters | |
Open Mode | The open mode defines the purpose and permissions of the file connection, and may be one of the following values: |
Read Mode | The read mode defines whether the file will be initially read by line or by character, and may be one of the following values: |
To open a new file:
Use the [File->Open] tag. The following example closes the connection to the myfile.txt file, and opens a new connection to a file named otherfile.txt.
[Var:'File'=(File: 'myfile.txt', File_OpenRead, File_ModeChar)]
[$File->(Open: 'otherfile.txt', File_OpenReadWrite)]
Substitution | ||
---|---|---|
|
|
|